package zmm

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
	"github.com/tiger1103/gfast/v3/internal/app/zmm/model/entity"
)

type ZmmShopListReq struct {
	g.Meta `path:"/zmm_shop/list" tags:"店铺管理" method:"get" summary:"店铺列表" security:"bearer"`
	Name   string `p:"name"`
}

type ZmmShopListRes struct {
	g.Meta      `mime:"application/json"`
	ZmmShopList []*entity.ZmmShop `json:"zmm_shop_list"`
}

type ZmmShopEditReq struct {
	g.Meta `path:"/zmm_shop/edit" tags:"店铺管理" method:"post" summary:"店铺修改" security:"bearer"`
	ID     uint64 `p:"id" v:"integer#ID必须为数字" summary:"ID" d:"0"`
	Name   string `p:"name" v:"required#请输入店铺名称" d:""`
	UpId   uint64 `p:"up_id" v:"integer#上级信息选择有误" d:"0"`
}
type ZmmShopEditRes struct {
	g.Meta `mime:"application/json"`
	ID     uint64 `json:"id"`
}

type ZmmShopDelReq struct {
	g.Meta `path:"/zmm_shop/delete" tags:"店铺管理" method:"delete" summary:"店铺删除" security:"bearer"`
	ID     uint64 `p:"id" v:"required|integer#ID参数错误|ID必须为数字" summary:"ID" d:"0"`
}
type ZmmShopDelRes struct{}

type ZmmShopStatisticsReq struct {
	g.Meta    `path:"/zmm_shop/statistic" tags:"店铺管理" method:"post" summary:"统计信息" security:"bearer"`
	StartTime *gtime.Time `p:"start_time" v:"required|datetime#开始时间参数错误|开始时间格式错误"`
	EndTime   *gtime.Time `p:"end_time" v:"required|datetime#结束时间参数错误|结束时间格式错误"`
	ShopId    string      `p:"shop_id"`
}

type ZmmShopStatisticsRes g.Map
